package com.sherlocky.learning.java17.sealed.interfaces;

/**
 * sealed修饰接口
 */
sealed interface Celestial
        permits Planet, Star, Comet {

}

final class Planet implements Celestial {

}

final class Star implements Celestial {

}

final class Comet implements Celestial {

}